home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Bavarian / Bavarian #060 (19xx)(APS Electronic).zip / Bavarian #060 (19xx)(APS Electronic).adf / Err4.asm < prev    next >
Assembly Source File  |  1988-12-31  |  17KB  |  797 lines

  1. *=============================================================================
  2. *
  3. *
  4. *                    Err4
  5. *
  6. *
  7. *           Copyright 1987  All Rights Reserved
  8. *
  9. *
  10. *              Christian Johnsen
  11. *
  12. *
  13. *=============================================================================
  14.  
  15.  
  16. *=============================================================================
  17. *
  18. *                Declarations
  19. *
  20. *=============================================================================
  21.  
  22. *=============================================================================
  23. *
  24. *        INCLUDE        "exec/types.i"
  25. *        INCLUDE        "exec/tasks.i"
  26. *        INCLUDE        "exec/libraries.i"
  27. *        INCLUDE        "intuition/intuition.i"
  28. *        INCLUDE        "graphics/gfxbase.i"
  29. *        INCLUDE        "exec/nodes.i"
  30. *        INCLUDE        "exec/lists.i"
  31. *        INCLUDE        "exec/ports.i"
  32. *        INCLUDE        "libraries/dos.i"
  33. *        INCLUDE        "libraries/dosextens.i"
  34. *        INCLUDE        "workbench/startup.i"
  35. *
  36. *=============================================================================
  37.  
  38.  
  39.         INCLUDE    "TrapEQU"        file of above includes EQU'd
  40.  
  41.         IDNT    "Err4"            declare name
  42.  
  43.         XDEF    _ErrorHandler        reentry after error 
  44.         XDEF    _Main                reference for startup code
  45.  
  46.         XREF    _GOMF            entry for initialization
  47.         XREF    _GOMFEnding        entry for termination
  48.         XREF    _ProgramCounter        contains user program counter
  49.         XREF    _LibraryErr        contains pointer to string
  50.         XREF    _GeneralErr        contains pointer to string
  51.         XREF    _SpecificErr        contains pointer to string
  52.         XREF    _WHAP            BYTE BOOLEAN flag for selection
  53.  
  54.         XREF    _AbsExecBase        amiga.lib
  55.         XREF    _romstart        amiga.lib
  56.  
  57.         XREF    _LVOClearScreen        grahics.library
  58.         XREF    _LVOCloseWindow        intuition.library
  59.         XREF    _LVOCloseLibrary    exec.library
  60.         XREF    _LVODrawBorder        intuition.library
  61.         XREF    _LVOGetMsg        exec.library
  62.         XREF    _LVOMove        exec.library
  63.         XREF    _LVOOpen        dos.library
  64.         XREF    _LVOOpenLibrary        exec.library
  65.         XREF    _LVOOpenWindow        intuition.library
  66.         XREF    _LVORefreshGadgets    intuition.library
  67.         XREF    _LVOReplyMsg        exec.library
  68.         XREF    _LVOSetBPen        grahics.library
  69.         XREF    _LVOPrintIText        intuition.library
  70.         XREF    _LVOWindowToFront    intuition.library
  71.         XREF    _LVOWaitPort        exec.library
  72.  
  73. Program        EQU    $000000            base address
  74. FlagUp        EQU    $FF            on or selected status
  75. FlagDown    EQU    $00            off or unselected status
  76.  
  77.  
  78. *=============================================================================
  79. *
  80. *               Program To Link With GOMF1.0
  81. *
  82. *=============================================================================
  83.  
  84.  
  85.     RORG    Program            relocatable position origin
  86.  
  87. _Main
  88.  
  89. *-----------------------------------------------------------------------------
  90. Err4
  91. *-----------------------------------------------------------------------------
  92.  
  93.     MOVEM.L    D1-D7/A0-A6,-(A7)    stack registers to preserve
  94.     MOVEA.L    _AbsExecBase,A6        get pointer to Exec base
  95.  
  96. OpenIntuition
  97.  
  98.     LEA.L    IntuitName,A1        set library name pointer
  99.     MOVEQ    #0,D0            expect any version
  100.     JSR    _LVOOpenLibrary(A6)    open Exec library
  101.     MOVE.L    D0,IntuitLib        save library base pointer
  102.     BEQ    NormalEnding        if not end clean else...
  103.  
  104. OpenWindow
  105.  
  106.     MOVEA.L    IntuitLib,A6        set pointer to library node
  107.     LEA.L    TrapCreatorWindowStructure,A0 set new window pointer
  108.     MOVEQ    #0,D0            expect pointer return
  109.     JSR    _LVOOpenWindow(A6)    open the window
  110.     MOVE.L    D0,WindowPnt        save pointer to new window
  111.     BEQ    NormalEnding        no window - so exit else...
  112.     MOVEA.L    D0,A0            set new window pointer
  113.     MOVE.L    wd_RPort(A0),RastPnt    save rastport pointer
  114.     MOVE.L    wd_UserPort(A0),UserPnt save IDCMP port pointer
  115.  
  116. TrapErrMessage
  117.  
  118.     MOVEA.L    IntuitLib,A6        set pointer to library base
  119.     MOVEQ    #0,D0            x rastport offset
  120.     MOVEQ    #0,D1            y rastport offset
  121.     MOVE.L    RastPnt,A0        retrieve rastport pointer
  122.     LEA.L    TrapIntuiTextList,A1    copy intuitext structure pointer
  123.     JSR    _LVOPrintIText(A6)    print our title in window
  124.  
  125. SetupGOMF
  126.  
  127.     MOVEQ    #0,D0            expect a return code
  128.     JSR    _GOMF            initialize GOMF1.0
  129.     TST.L    D0            was there an error?
  130.     BEQ    TrapErrAwaitMessage    if not continue else...
  131.     BRA    CloseTheWindow        quit clean
  132.  
  133. _ErrorHandler
  134.  
  135.     TST.B    PrintFlag        should we print the normal message
  136.     BEQ    TrapErrAwaitMessage    if so do nothing else...
  137.     BSR    PrintIt            print message from GOMF
  138.  
  139. TrapErrAwaitMessage
  140.  
  141.     MOVE.B    #FlagUp,PrintFlag    set the print flag
  142.     MOVEA.L    _AbsExecBase,A6        set pointer to library base
  143.     MOVEQ    #0,D0            expect a message pointer
  144.     MOVEA.L    UserPnt,A0        copy message port pointer
  145.     JSR    _LVOWaitPort(A6)    get a message
  146.     MOVEA.L    _AbsExecBase,A6        set pointer to library base
  147.     MOVEQ    #0,D0            expect a message pointer
  148.     MOVEA.L    UserPnt,A0        copy message port pointer
  149.     JSR    _LVOGetMsg(A6)        get a message
  150.     TST.L    D0            did we get one?
  151.     BEQ    TrapErrAwaitMessage    no so skip back else...
  152.     MOVEA.L    D0,A1            copy message pointer
  153.     MOVE.L    D0,MsgPnt        save message node pointer
  154.     MOVE.L    im_Class(A1),D1        fetch intuition message class
  155.  
  156. CloseWindowMessage
  157.  
  158.     CMPI.L    #CLOSEWINDOW,D1        is it a close gadget message?
  159.     BEQ    DoClose            if so quit else...
  160.  
  161. GadgetUpMessage
  162.  
  163.     CMPI.L    #GADGETUP,D1        is it a gadget up message?
  164.     BNE    TrapWhatElse        if so quit else...
  165.  
  166. TrapGadgets
  167.  
  168.     MOVEA.L    im_IAddress(A1),A0    get gadget structure address
  169.     MOVE.W    gg_GadgetID(A0),D0    get gadget id number
  170.     CMPI.W    #1,D0            address error gadget?
  171.     BEQ    DoTrap3            if so perform error else...
  172.  
  173. IllInstructGadget
  174.  
  175.     CMPI.W    #2,D0            illegal instruction gadget?
  176.     BEQ    DoTrap4            if so perform error else...
  177.  
  178. Div0Gadget
  179.  
  180.     CMPI.W    #3,D0            division by zero gadget?
  181.     BEQ    DoTrap5            if so perform error else...
  182.  
  183. CHKInstructGadget
  184.  
  185.     CMPI.W    #4,D0            CHK instruction gadget?
  186.     BEQ    DoTrap6            if so perform error else...
  187.  
  188. OverflowGadget
  189.  
  190.     CMPI.W    #5,D0            overflow error gadget?
  191.     BEQ    DoTrap7            if so perform error else...
  192.  
  193. PiviledgeGadget
  194.  
  195.     CMPI.W    #6,D0            privelege violation gadget?
  196.     BEQ    DoTrap8            if so perform error else...
  197.  
  198. Opcode1010Gadget
  199.  
  200.     CMPI.W    #7,D0            opcode 1010 gadget?
  201.     BEQ    DoTrapA            if so perform error else...
  202.  
  203. Opcode1111Gadget
  204.  
  205.     CMPI.W    #8,D0            opcode 1111 gadget?
  206.     BEQ    DoTrapB            if so perform error else...
  207.  
  208. TrapWhatElse
  209.  
  210.     MOVEA.L    MsgPnt,A1        set message structure pointer
  211.     BSR    FreeMessage        return message structure
  212.     BRA    TrapErrAwaitMessage    snooze until more news
  213.  
  214. *-----------------------------------------------------------------------------
  215. ErrorRoutines
  216. *-----------------------------------------------------------------------------
  217.  
  218. DoTrap3
  219.  
  220.     MOVEA.L    MsgPnt,A1        set message structure pointer
  221.     BSR    FreeMessage        return message structure
  222.     MOVE.L    3,D0            cause address error
  223.  
  224. DoTrap4
  225.  
  226.     MOVEA.L    MsgPnt,A1        set message structure pointer
  227.     BSR    FreeMessage        return message structure
  228.     DC.W    $4529            illegal opcode value
  229.  
  230. DoTrap5
  231.  
  232.     MOVEA.L    MsgPnt,A1        set message structure pointer
  233.     BSR    FreeMessage        return message structure
  234.     MOVEQ    #0,D0            set for zero division
  235.     MOVEQ    #0,D1            set for zero division
  236.     DIVU    D0,D1            divide zero by zero
  237.  
  238. DoTrap6
  239.  
  240.     MOVEA.L    MsgPnt,A1        set message structure pointer
  241.     BSR    FreeMessage        return message structure
  242.     MOVE.L    #1,D0            set D0 to small value
  243.     MOVE.L    #-1,D1            set D1 to negative value
  244.     CHK    D0,D1            cause a CHK trap
  245.  
  246. DoTrap7
  247.  
  248.     MOVEA.L    MsgPnt,A1        set message structure pointer
  249.     BSR    FreeMessage        return message structure
  250.      MOVE    #%00000010,CCR        set overflow bit of status register
  251.     TRAPV                cause the trap call
  252.  
  253. CreditsCopyrightNotice
  254.  
  255. AuthorName    DC.B    '  Written in assembler by Christian Johnsen '
  256. Notice        DC.B    ' COPYRIGHT © 1987 - ALL RIGHTS RESERVED  '
  257.         CNOP    0,2
  258.  
  259. DoTrap8
  260.  
  261.     MOVEA.L    MsgPnt,A1        set message structure pointer
  262.     BSR    FreeMessage        return message structure
  263.     MOVE.W    #25,SR            violate privilege
  264.  
  265. DoTrapA
  266.  
  267.     MOVEA.L    MsgPnt,A1        set message structure pointer
  268.     BSR    FreeMessage        return message structure
  269.     DC.W    $A123            instruction word between A000 and AFFF
  270.  
  271. DoTrapB
  272.  
  273.     MOVEA.L    MsgPnt,A1        set message structure pointer
  274.     BSR    FreeMessage        return message structure
  275.     DC.W    $F123            instruction word between F000 and FFFF
  276.  
  277. DoClose
  278.  
  279.     MOVEA.L    MsgPnt,A1        set message structure pointer
  280.     BSR    FreeMessage        return message structure
  281.     MOVEA.L    _AbsExecBase,A6        set pointer to library base
  282.     MOVEQ    #0,D0            expect a message pointer
  283.     MOVEA.L    UserPnt,A0        copy message port pointer
  284.     JSR    _LVOGetMsg(A6)        try for another message
  285.     TST.L    D0            did we get one?
  286.     BNE    DoClose            if so skip back else...
  287.     MOVEQ    #0,D0            expect a return code
  288.     JSR    _GOMFEnding        allow GOMF1.0 to terminate
  289.     TST.L    D0            was there an error?
  290.     BEQ    CloseTheWindow        if not continue else...
  291.     BRA    NormalEnding        quit but leave window open
  292.  
  293. CloseTheWindow
  294.  
  295.     TST.L    WindowPnt        window open?
  296.     BEQ    EndIntuition        if not skip else...
  297.     MOVEA.L    WindowPnt,A0        pass window pointer
  298.     MOVEA.L    IntuitLib,A6        get library base pointer
  299.     JSR    _LVOCloseWindow(A6)    if so close up window
  300.  
  301. *-----------------------------------------------------------------------------
  302. NormalEnding
  303. *-----------------------------------------------------------------------------
  304.  
  305. EndIntuition
  306.  
  307.     TST.L    IntuitLib        Intuition open?
  308.     BEQ    EndUp            if not skip else...
  309.     MOVEA.L    _AbsExecBase,A6        get exec library base pointer
  310.     MOVEA.L    IntuitLib,A1        get library node
  311.     JSR    _LVOCloseLibrary(A6)    close it
  312.  
  313. EndUp
  314.  
  315.     MOVEM.L    (A7)+,D1-D7/A0-A6    stack registers to preserve
  316.     MOVEQ    #0,D1            return favourable error code
  317.     RTS                task terminated cleanly
  318.  
  319. *-----------------------------------------------------------------------------
  320. PrintIt
  321. *-----------------------------------------------------------------------------
  322.  
  323. BlankOutOldMessage
  324.  
  325.     MOVE.L    #BlankLine,Line1    blank old message line
  326.     MOVE.L    #BlankLine,Line2    blank old message line
  327.     MOVE.L    #BlankLine,Line3    blank old message line
  328.     MOVE.L    #BlankLine,Line4    blank old message line
  329.     MOVEA.L    IntuitLib,A6        set pointer to library base
  330.     MOVEQ    #0,D0            x rastport offset
  331.     MOVEQ    #0,D1            y rastport offset
  332.     MOVE.L    RastPnt,A0        retrieve rastport pointer
  333.     LEA.L    TrapIntuiTextList,A1    copy intuitext structure pointer
  334.     JSR    _LVOPrintIText(A6)    print our title in window
  335.  
  336. SetNewMessage
  337.  
  338.     LEA.L    _LibraryErr,A0        set pointer to GOMF feedback element
  339.     MOVE.L    (A0)+,Line1        setup a line
  340.     MOVE.L    (A0)+,Line2        setup a line
  341.     MOVE.L    (A0)+,Line3        setup a line
  342.     MOVE.B    (A0),D0            get the WHAP flag
  343.     TST.B    D0            what's the state returned?
  344.     BNE    DidWhap            if true then whapped
  345.     MOVE.L    #NotWhapped,Line4    if not advise user
  346.     BRA    PrintLines        print it
  347.  
  348. DidWhap
  349.  
  350.     MOVE.L    #Whapped,Line4        if not advise user
  351.  
  352. PrintLines
  353.  
  354.     LEA.L    _ProgramCounter,A0    set pointer to GOMF feedback element
  355.     MOVE.L    (A0),D0            setup a line
  356.     LEA.L    PCNum,A0        set pointer string segment
  357.     BSR    PlexHexText        make PC a string and place it
  358.     MOVE.L    #PCString,PCText    set pointer to program counter string
  359.     MOVEA.L    IntuitLib,A6        set pointer to library base
  360.     MOVEQ    #0,D0            x rastport offset
  361.     MOVEQ    #0,D1            y rastport offset
  362.     MOVE.L    RastPnt,A0        retrieve rastport pointer
  363.     LEA.L    TrapIntuiTextList,A1    copy intuitext structure pointer
  364.     JSR    _LVOPrintIText(A6)    print our title in window
  365.     RTS                back for another call
  366.  
  367. *-----------------------------------------------------------------------------
  368. FreeMessage
  369. *-----------------------------------------------------------------------------
  370.  
  371.     MOVEA.L    _AbsExecBase,A6        get library base pointer
  372.     JSR    _LVOReplyMsg(A6)    return the message structure
  373.     RTS                back for more
  374.  
  375. *-----------------------------------------------------------------------------
  376. PlexHexText
  377. *-----------------------------------------------------------------------------
  378.  
  379.     MOVE.L    D2,-(A7)        stack register temporarily
  380.     MOVEQ    #3,D2            set up count register
  381.     BRA    DecodeBits        skip shifting first time through
  382.  
  383. ShiftToNextBits
  384.  
  385.     LSR.L    #8,D0            shift error number right 1 byte
  386.  
  387. DecodeBits
  388.  
  389.     MOVEQ    #0,D1            zero register
  390.     MOVE.B    D0,D1            get first byte
  391.     ANDI.B    #%00001111,D1        mask upper nybble
  392.     BSR    HexToASCII        convert digit
  393.     MOVE.B    D0,D1            get first byte
  394.     LSR.B    #4,D1            shift upper nibble low
  395.     ANDI.B    #%00001111,D1        mask upper nybble
  396.     BSR    HexToASCII        convert digit
  397.     DBEQ    D2,ShiftToNextBits    decrement counter until done
  398.     MOVE.L    (A7)+,D2        retrieve stacked register
  399.     RTS                hex number converted to ASCII string 
  400.  
  401. *-----------------------------------------------------------------------------
  402. HexToASCII
  403. *-----------------------------------------------------------------------------
  404.  
  405.     CMPI.B    #10,D1            decimal digit or hex letter?
  406.     BLT    AddZero            if so skip next operation
  407.     ADDI.B    #'A'-'0'-$0A,D1        offset to letters
  408.  
  409. AddZero
  410.  
  411.     ADDI.B    #'0',D1            convert it to ASCII
  412.     MOVE.B    D1,-(A0)        hex digit added to buffer
  413.     RTS                
  414.  
  415.  
  416. *=============================================================================
  417. *
  418. *            Memory  Constants / Variables
  419. *
  420. *=============================================================================
  421.  
  422.  
  423. *-----------------------------------------------------------------------------
  424.             SECTION    TrapInitVars,DATA
  425. *-----------------------------------------------------------------------------
  426.  
  427.         CNOP    0,4        align structure
  428.  
  429. IntuitName    DC.B    'intuition.library',0
  430.  
  431.         CNOP    0,4        align structure
  432.  
  433. DefaultInitialization
  434.  
  435. IntuitLib    DC.L    0        intuition library base pointer
  436. RastPnt        DC.L    0        rastport pointer
  437. WindowPnt    DC.L    0        window pointer
  438. UserPnt        DC.L    0        user reply port pointer
  439. MsgPnt        DC.L    0        tempory store for message pointer
  440. PrintFlag    DC.B    FlagDown    flag for return message printing
  441.  
  442.  
  443. *============================================================================
  444. *
  445. *            Trap Tester  Window Structures
  446. *
  447. *============================================================================
  448.  
  449.  
  450.         CNOP    0,4        align structure
  451.  
  452. TrapCreatorWindowStructure
  453.  
  454.     DC.W    277,15,335,176
  455.     DC.B    0,1
  456.     DC.L    GADGETUP!CLOSEWINDOW
  457.     DC.L    WINDOWCLOSE!WINDOWDRAG!WINDOWDEPTH!ACTIVATE
  458.     DC.L    TrapGadget3,0
  459.     DC.L    TrapName,0,0
  460.     DC.W    335,176,335,176,WBENCHSCREEN
  461.  
  462. TrapName
  463.  
  464.     DC.B    ' Err4 ',0
  465.     CNOP 0,2
  466.  
  467. TrapGadgetList
  468.  
  469. TrapGadget3
  470.  
  471.     DC.L    TrapGadget1
  472.     DC.W    183,70,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  473.     DC.L    TrapBord1,0,TrapText1,0,0
  474.     DC.W    2
  475.     DC.L    0
  476.  
  477. TrapBord1
  478.  
  479.     DC.W    -2,-1
  480.     DC.B    1,0,RP_JAM2
  481.     DC.B    5
  482.     DC.L    TrapBordVectors1,0
  483.  
  484. TrapBordVectors1
  485.  
  486.     DC.W    0,0,116,0,116,17,0,17,0,0
  487.  
  488. TrapText1
  489.  
  490.     DC.B    3,0,RP_JAM2,0
  491.     DC.W    8,4
  492.     DC.L    0,TrapIText1,0
  493.  
  494. TrapIText1
  495.  
  496.     DC.B    'Illegal Inst',0
  497.     CNOP 0,2
  498.  
  499. TrapGadget1
  500.  
  501.     DC.L    TrapGadget5
  502.     DC.W    36,70,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  503.     DC.L    TrapBord2,0,TrapText2,0,0
  504.     DC.W    1
  505.     DC.L    0
  506.  
  507. TrapBord2
  508.  
  509.     DC.W    -2,-1
  510.     DC.B    1,0,RP_JAM2,5
  511.     DC.L    TrapBordVectors2,0
  512.  
  513. TrapBordVectors2
  514.  
  515.     DC.W    0,0,116,0,116,17,0,17,0,0
  516.  
  517. TrapText2
  518.  
  519.     DC.B    3,0,RP_JAM2,0
  520.     DC.W    5,4
  521.     DC.L    0,TrapIText2,0
  522.  
  523. TrapIText2
  524.  
  525.     DC.B    'Address Error',0
  526.     CNOP 0,2
  527.  
  528. TrapGadget5
  529.  
  530.     DC.L    TrapGadget6
  531.     DC.W    37,94,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  532.     DC.L    TrapBord3,0,TrapText3,0,0
  533.     DC.W    3
  534.     DC.L    0
  535.  
  536. TrapBord3
  537.  
  538.     DC.W    -2,-1
  539.     DC.B    1,0,RP_JAM2,5
  540.     DC.L    TrapBordVectors3,0
  541.  
  542. TrapBordVectors3
  543.  
  544.     DC.W    0,0,116,0,116,17,0,17,0,0
  545.  
  546. TrapText3
  547.  
  548.     DC.B    3,0,RP_JAM2,0
  549.     DC.W    13,4
  550.     DC.L    0,TrapIText3,0
  551.  
  552. TrapIText3
  553.  
  554.     DC.B    'Divide Zero',0
  555.     CNOP 0,2
  556.  
  557. TrapGadget6
  558.  
  559.     DC.L    TrapGadget7
  560.     DC.W    183,94,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  561.     DC.L    TrapBord4,0,TrapText4,0,0
  562.     DC.W    4
  563.     DC.L    0
  564.  
  565. TrapBord4
  566.  
  567.     DC.W    -2,-1
  568.     DC.B    1,0,RP_JAM2,5
  569.     DC.L    TrapBordVectors4
  570.     DC.L    0
  571.  
  572. TrapBordVectors4
  573.  
  574.     DC.W    0,0,116,0,116,17,0,17,0,0
  575.  
  576. TrapText4
  577.  
  578.     DC.B    3,0,RP_JAM2,0
  579.     DC.W    25,4
  580.     DC.L    0,TrapIText4,0
  581.  
  582. TrapIText4
  583.  
  584.     DC.B    'CHK Inst',0
  585.     CNOP 0,2
  586.  
  587. TrapGadget7
  588.  
  589.     DC.L    TrapGadget8
  590.     DC.W    37,118,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  591.     DC.L    TrapBord5,0,TrapText5,0,0
  592.     DC.W    5
  593.     DC.L    0
  594.  
  595. TrapBord5
  596.  
  597.     DC.W    -2,-1
  598.     DC.B    1,0,RP_JAM2,5
  599.     DC.L    TrapBordVectors5,0
  600.  
  601. TrapBordVectors5
  602.  
  603.     DC.W    0,0,116,0,116,17,0,17,0,0
  604.  
  605. TrapText5
  606.  
  607.     DC.B    3,0,RP_JAM2,0
  608.     DC.W    5,4
  609.     DC.L    0,TrapIText5,0
  610.  
  611. TrapIText5
  612.  
  613.     DC.B    'Overflow Trap',0
  614.     CNOP 0,2
  615.  
  616. TrapGadget8
  617.  
  618.     DC.L    TrapGadget9
  619.     DC.W    184,118,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  620.     DC.L    TrapBord6,0,TrapText6,0,0
  621.     DC.W    6
  622.     DC.L    0
  623.  
  624. TrapBord6
  625.  
  626.     DC.W    -2,-1
  627.     DC.B    1,0,RP_JAM2,5
  628.     DC.L    TrapBordVectors6,0
  629.  
  630. TrapBordVectors6
  631.  
  632.     DC.W    0,0,116,0,116,17,0,17,0,0
  633.  
  634. TrapText6
  635.  
  636.     DC.B    3,0,RP_JAM2,0
  637.     DC.W    8,4
  638.     DC.L    0,TrapIText6,0
  639.  
  640. TrapIText6
  641.  
  642.     DC.B    'Priv Violate',0
  643.     CNOP 0,2
  644.  
  645. TrapGadget9
  646.  
  647.     DC.L    TrapGadget10
  648.     DC.W    38,142,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  649.     DC.L    TrapBord7,0,TrapText7,0,0
  650.     DC.W    7
  651.     DC.L    0
  652.  
  653. TrapBord7
  654.  
  655.     DC.W    -2,-1
  656.     DC.B    1,0,RP_JAM2,5
  657.     DC.L    TrapBordVectors7,0
  658.  
  659. TrapBordVectors7
  660.  
  661.     DC.W    0,0,116,0,116,17,0,17,0,0
  662.  
  663. TrapText7
  664.  
  665.     DC.B    3,0,RP_JAM2,0
  666.     DC.W    14,5
  667.     DC.L    0,TrapIText7,0
  668.  
  669. TrapIText7
  670.  
  671.     DC.B    '1010 Opcode',0
  672.     CNOP 0,2
  673.  
  674. TrapGadget10
  675.  
  676.     DC.L    0
  677.     DC.W    185,142,113,16,GADGHCOMP,RELVERIFY,BOOLGADGET
  678.     DC.L    TrapBord8,0,TrapText8,0,0
  679.     DC.W    8
  680.     DC.L    0
  681.  
  682. TrapBord8
  683.  
  684.     DC.W    -2,-1
  685.     DC.B    1,0,RP_JAM2,5
  686.     DC.L    TrapBordVectors8,0
  687.  
  688. TrapBordVectors8
  689.  
  690.     DC.W    0,0,116,0,116,17,0,17,0,0
  691.  
  692. TrapText8
  693.  
  694.     DC.B    3,0,RP_JAM2,0
  695.     DC.W    12,5
  696.     DC.L    0,TrapIText8,0
  697.  
  698. TrapIText8
  699.  
  700.     DC.B    '1111 Opcode',0
  701.     CNOP 0,2
  702.  
  703. TrapIntuiTextList
  704.  
  705. TrapText9
  706.  
  707.     DC.B    1,0,RP_JAM2,0
  708.     DC.W    18,15
  709.     DC.L    TOPAZ80
  710. Line1    DC.L    TrapIText9,TrapText10
  711.  
  712. TrapIText9
  713.  
  714.     DC.B    'This program has been linked with    ',0
  715.     CNOP 0,2
  716.  
  717. TrapText10
  718.  
  719.     DC.B    1,0,RP_JAM2,0
  720.     DC.W    18,26
  721.     DC.L    TOPAZ80
  722. Line2    DC.L    TrapIText10,TrapText11
  723.  
  724. TrapIText10
  725.  
  726.     DC.B    'GOMF 1.0, which will trap any errors ',0
  727.     CNOP 0,2
  728.  
  729. TrapText11
  730.  
  731.     DC.B    1,0,RP_JAM2,0
  732.     DC.W    18,38
  733.     DC.L    TOPAZ80
  734. Line3    DC.L    TrapIText11,TrapText12
  735.  
  736. TrapIText11
  737.  
  738.     DC.B    'created by your gadget selections.   ',0
  739.     CNOP 0,2
  740.  
  741. TrapText12
  742.  
  743.     DC.B    1,0,RP_JAM2,0
  744.     DC.W    18,50
  745.     DC.L    TOPAZ80
  746. Line4    DC.L    TrapIText12
  747. PCText    DC.L    0
  748.  
  749. TrapIText12
  750.  
  751.     DC.B    'Please select a gadget to test it.   ',0
  752.     CNOP 0,2
  753.  
  754. Whapped
  755.  
  756.     DC.B    'User selected the WHAP gadget.       ',0
  757.     CNOP 0,2
  758.  
  759. NotWhapped
  760.  
  761.     DC.B    'User did not select the WHAP gadget.  ',0
  762.     CNOP 0,2
  763.  
  764. PCString
  765.  
  766.     DC.B    1,0,RP_JAM2,0
  767.     DC.W    168,15
  768.     DC.L    TOPAZ80
  769.     DC.L    PCNumberString,0
  770.  
  771. PCNumberString
  772.  
  773.     DC.B    '     PC          '
  774. PCNum    
  775.     DC.B    0
  776.     CNOP 0,2
  777.  
  778. BlankLine
  779.  
  780.     DC.B    '                                     ',0
  781.     CNOP 0,2
  782.  
  783. TOPAZ80
  784.  
  785.     DC.L    TOPAZname
  786.     DC.W    TOPAZ_EIGHTY
  787.     DC.B    0,0
  788.  
  789. TOPAZname
  790.  
  791.     DC.B    'topaz.font',0
  792.     CNOP 0,2
  793.  
  794.  
  795.     END                assembly completed
  796.  
  797.